_Pragma("once");

#include <regex>

#include "ExtendDevice.h"
#include "common.h"
#include "VersionInfo.h"
#include "ConfigManager.h"
#include "GuiContext.h"

/**
 *
 * @author lizb
 */


class CommandExecutor;

class GpsSensor : public ExtendDevice {
    static const std::regex pattern;
public:
    GpsSensor(DummyChannel& channel, const ExtendDeviceType& deviceType, const std::string& deviceActknowlege);


    bool recheck() noexcept override{
        return activeUpdateInformation();
    }

    bool activeUpdateInformation(void) override;

    bool updateInformation(void) override;

    /**
    * 经度
    */
    std::string longitude = "00000.0000";
    /**
     * 东经/西经
     */
    char longitudeSymbol = 'E';
    /**
     * 纬度
     */
    std::string  latitude = "0000.0000";
    /**
     * 南纬/北纬
     */
    char latitudeSymbol = 'N';
    /**
     * GPS是否有信号
     */
    std::string satelliteQuantity = "00";
    std::string signalNoise = "00";


    protected:

    CommandExecutor& mcommandExecutor;
};


